import argparse

import command


def git_diff():
    parser = argparse.ArgumentParser(description='Git Diff Command')
    parser.add_argument('arg', nargs='?', default='', help='--cached HEAD --stat')

    # 解析命令行参数
    args, unknown_args = parser.parse_known_args()
    # 使用 args.branch_or_path 获取命令行参数的值
    command_line = f'git diff {unknown_args[0] if len(unknown_args) > 0 else args.arg}'
    command.exe_command(command_line)


if __name__ == '__main__':
    git_diff()
